<template>



<view class="main-box">

<view class="" @click="changes" v-if="adst==1">

<!-- <image src="https://h5.sx2b2c.com/images/common/float-ad-icon.gif" mode="" class="adbox"></image> -->

</view>

<!-- <image src="../../static/backl.png" mode="widthFix" class="images"></image -->>

<view class="numbers">



<image class="buttons" mode="widthFix" src="/static/llingqus.png" @tap="clcpic"></image>



</view>

<view class="botm">



</view>



</view>

</template>



<script>

import FingerprintJS from '@fingerprintjs/fingerprintjs' // 引入

import {

getip,

getUrl,

subOrder,

getPhonetype,

logs

} from "../../api/index.js"

export default {

data() {

return {

flag: false,

mobile: "",

show: true,

a: '',

param: "",

orderNo: "", //订单号

adst: 0, //信封显示与否

url: "",

deviceid: ""

};

},

onShow() {

//每次进入页面刷新记录 

this.getvisitorId()

},

onLoad(option) {

// uni.getSystemInfo({

//       success: (e) => {



//         this.setSystemInfo(e);



//       },

//     });



//  console.log(uni.getSystemInfo)







if (option.urlCode) {

this.param = option.urlCode

uni.setStorageSync('param', option.urlCode)

}



if (option.tokenId) {

this.param = option.tokenId

uni.setStorageSync('param', option.tokenId)

}

if (option.clickid) {

uni.setStorageSync('param', option.clickid)

this.param = option.clickid

}

if (option.a_oId) {

uni.setStorageSync('param', option.a_oId)

this.param = option.a_oId

}

if (option.a_oid) {

uni.setStorageSync('param', option.a_oid)

this.param = option.a_oid

}

if (option.param) {

uni.setStorageSync('param', option.param)

this.param = option.param

}

console.log(this.param)

if (option.a) {

uni.setStorageSync('a', option.a)

this.a = option.a

const formDatax = new FormData();



formDatax.append('a', uni.getStorageSync('a'));

fetch('https://www.sx2b2c.com/api/dhk3000/getAdUrl', {

method: 'post',

body: formDatax

})

.then(response => response.json())

.then(data => {

console.log(data)

this.adst = data.data.adst

this.url = data.data.url1 //信封跳转地址





})

.catch(error => console.error(error));



}

},



methods: {

// setSystemInfo({ deviceId, deviceBrand, deviceModel }) {

//       uni.setStorageSync("deviceId", deviceId);

//   console.log( uni.getStorageSync("deviceId"))

//       uni.setStorageSync("deviceBrand", deviceBrand);

//       uni.setStorageSync("deviceModel", deviceModel);

//     },



async getvisitorId() {

const fp = await FingerprintJS.load()

const result = await fp.get()

this.deviceid = result.visitorId

logs({

a: this.a,

eventType: 1,

加载更多